package com.easy.dao;

import com.easy.bean.Reservations;
import com.easy.util.Page;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface IReservationsDao {
    int addReservations(Reservations reservations);

    @Insert("insert into reservations value()")
    int save(Reservations reservations);
    //获取
    Reservations getReservations(int id);
    //删除
    int delReservations(int id);
    //修改
    int editReservations(Reservations reservations);

    int editReservations_room(Reservations reservations);
    int edit(@Param("id") int id, @Param("reservations")Reservations reservations);

    //查询
    List<Reservations> getSearchReservations(Reservations reservations);

    List<Reservations> getSearchReservations(@Param("reservations") Reservations reservations, @Param("page") Page page);

    int getCount(@Param("reservations")Reservations reservations);


}
